package com.zjxmyq.authorization;

import com.gitee.sunchenbin.mybatis.actable.manager.handler.StartUpHandler;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.mybatis.spring.annotation.MapperScan;
import org.mybatis.spring.annotation.MapperScans;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.client.RestTemplate;

@EnableDubbo
@SpringBootApplication
@MapperScan("com.zjxmyq.authorization.mapper")
@MapperScan("com.gitee.sunchenbin.mybatis.actable.dao.*")
@MapperScan("com.baomidou.mybatisplus.samples.quickstart.mapper")
@ComponentScan(basePackages = {"com.zjxmyq.authorization","com.zjxmyq.jwtmanage","com.gitee.sunchenbin.mybatis.actable.manager.*"})
public class AuthorizationApplication {

    public static void main(String[] args) {
        ConfigurableApplicationContext run = SpringApplication.run(AuthorizationApplication.class, args);
        // 容器中获取actable的核心处理类
        StartUpHandler bean =run.getBean(StartUpHandler.class, args);
        // 手动执行actable的建表方法
        bean.startHandler();
    }

}
